export default {
	state: {
		orderList:[],
	},
	getters: {
		getOrderList:state=>{
			return state.orderList;
		}
	},
	mutations: {
		addlist(state,obj){
			if(state.orderList.length == 0){
				obj.id = 1
			}else{
				obj.id = state.orderList[state.orderList.length-1].id+1
			}
			state.orderList.push(obj);
		},
	},
	actions: {
		addOrders(context,obj){
			context.commit('addlist',obj)
		}
	}
}